{template header}
<link href="{GODHOUSE_DOMAIN_WWW}css/calendar.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.textareaee{ width:80px; height:20px;}
.texta { width:160px; height:20px;}
</style>
<script language="javascript">
	J(function(){
	
		bopuruiObj.command.mtabletr();
		bopuruiObj.command.selectBoxAll();
		
		J('input[name=productId[]]').each( function(){
		
			J('#kp_'+this.value).bind('click', {id:this.value}, function(c){
				var rsw = J('#kp_'+c.data.id).html();

				if(rsw.indexOf('<') < 0 ){
					J('#kp_'+c.data.id).html('<textarea name=kp'+c.data.id+' id=kp'+c.data.id+' rows=2 class="textareaee">'+rsw+'</textarea>');
				}
				
				J('#kp'+c.data.id).focus();
				
				J('#kp'+c.data.id).bind('blur',{id:c.data.id},
						function(c){
							var str = this.value;
							J.ajax({
							   type: "POST",
							   url: "order-orderupdate.htm?updatetype=ajaxupdate&id="+c.data.id,
							   data: "bill_date="+encodeURIComponent(str)+"",
							   cache: false,
							   beforeSend : function(){J('#kp_'+c.data.id).html("<img src=../../images/common/loading.gif />");},
							   success: function(text){
									J('#kp_'+c.data.id).html(text);
							   },
							   ajaxError: function(){alert('发生错误，请刷新后重试!');}
							}); 
					});
				
			});
		
	});
		


	J('input[name=productId[]]').each( function(){
		
			J('#hq_'+this.value).bind('click', {id:this.value}, function(c){
				var rsw = J('#hq_'+c.data.id).html();

				if(rsw.indexOf('<') < 0 ){
					J('#hq_'+c.data.id).html('<textarea name=hq'+c.data.id+' id=hq'+c.data.id+' rows=2 class="textareaee">'+rsw+'</textarea>');
				}
				
				J('#hq'+c.data.id).focus();
				
				J('#hq'+c.data.id).bind('blur',{id:c.data.id},
						function(c){
							var str = this.value;
							J.ajax({
							   type: "POST",
							   url: "order-orderupdate.htm?updatetype=ajaxdeliver&id="+c.data.id,
							   data: "deliver="+encodeURIComponent(str)+"",
							   cache: false,
							   beforeSend : function(){J('#hq_'+c.data.id).html("<img src=../../images/common/loading.gif />");},
							   success: function(text){
								  
									J('#hq_'+c.data.id).html(text);
								   
							   },
							   ajaxError: function(){alert('发生错误，请刷新后重试!');}
							}); 
					});
				
			});
		
	});




	J('input[name=productId[]]').each( function(){
		
			J('#fk_'+this.value).bind('click', {id:this.value}, function(c){
				var rsw = J('#fk_'+c.data.id).html();

				if(rsw.indexOf('<') < 0 ){
					J('#fk_'+c.data.id).html('<textarea name=px'+c.data.id+' id=px'+c.data.id+' rows=2 class="textareaee">'+rsw+'</textarea>');
				}
				
				J('#px'+c.data.id).focus();
				
				J('#px'+c.data.id).bind('blur',{id:c.data.id},
						function(c){
							var str = this.value;
							J.ajax({
							   type: "POST",
							   url: "order-orderupdate.htm?updatetype=ajaxpayment&id="+c.data.id,
							   data: "payment="+encodeURIComponent(str)+"",
							   cache: false,
							   beforeSend : function(){J('#fk_'+c.data.id).html("<img src=../../images/common/loading.gif />");},
							   success: function(text){
								  
									J('#fk_'+c.data.id).html(text);
								   
							   },
							   ajaxError: function(){alert('发生错误，请刷新后重试!');}
							}); 
					});
				
			});
		
	});
	
	
	
	
	J('input[name=productId[]]').each( function(){
		
			J('#ht_'+this.value).bind('click', {id:this.value}, function(c){
				var rsw = J('#ht_'+c.data.id).html();

				if(rsw.indexOf('<') < 0 ){
					J('#ht_'+c.data.id).html('<textarea name=px'+c.data.id+' id=px'+c.data.id+' rows=2 class="textareaee">'+rsw+'</textarea>');
				}
				
				J('#px'+c.data.id).focus();
				
				J('#px'+c.data.id).bind('blur',{id:c.data.id},
						function(c){
							var str = this.value;
							J.ajax({
							   type: "POST",
							   url: "order-orderupdate.htm?updatetype=ajaxtotal&id="+c.data.id,
							   data: "total="+encodeURIComponent(str)+"",
							   cache: false,
							   beforeSend : function(){J('#ht_'+c.data.id).html("<img src=../../images/common/loading.gif />");},
							   success: function(text){
								  
									J('#ht_'+c.data.id).html(text);
								   
							   },
							   ajaxError: function(){alert('发生错误，请刷新后重试!');}
							}); 
					});
				
			});
		
	});



	J('input[name=productId[]]').each( function(){
		
			J('#xm_'+this.value).bind('click', {id:this.value}, function(c){
				var rsw = J('#xm_'+c.data.id).html();

				if(rsw.indexOf('<') < 0 ){
					J('#xm_'+c.data.id).html('<textarea name=px'+c.data.id+' id=px'+c.data.id+' rows=2 class="texta">'+rsw+'</textarea>');
				}
				
				J('#px'+c.data.id).focus();
				
				J('#px'+c.data.id).bind('blur',{id:c.data.id},
						function(c){
							var str = this.value;
							J.ajax({
							   type: "POST",
							   url: "order-orderupdate.htm?updatetype=ajaxproject&id="+c.data.id,
							   data: "project="+encodeURIComponent(str)+"",
							   cache: false,
							   beforeSend : function(){J('#xm_'+c.data.id).html("<img src=../../images/common/loading.gif />");},
							   success: function(text){
								  
									J('#xm_'+c.data.id).html(text);
								   
							   },
							   ajaxError: function(){alert('发生错误，请刷新后重试!');}
							}); 
					});
				
			});
		
	});	
	
	})
</script>
<div class="path">
	<span>订单管理</span>
	<span><a href="order-addorder.htm">添加订单</a></span>
</div>
<div class="content" style="width:1210px" >
	<div class="c1">
	<div style="border:1px #B9D1E3 solid; background:#FFFFFF">
		<form id="card-search" action="order-qiye.htm" method="POST">
			<table height="40" border="0" cellspacing="5" cellpadding="0">
				<tr>
					<td>订单号：</td><td><input type="text" name="orderNo" value="$orderNo" /></td>
					<td>用户名：</td><td><input type="text" name="userName" value="$userName" style="width:80px;" /></td>
					<td><input type="submit" name="submitTo" value=" 搜索 " class="bigButton" /></td>
				</tr>
			</table>
		</form>
	</div>
	<form action="user-delete.htm" method="post">
	      <table width="100%" border="0" cellspacing="1" cellpadding="2" class="table1" style="text-align:center;margin-top:10px;">
	        <tr>
			<th width="5%">序号</th>
			<th width="14%">用户名称</th>
			<th width="10%">合同编号</th>
			<th width="7%">项目名称</th>
			<th width="6%">合同额</th>
			<th width="8%">付款状态</th>
			<th width="8%">到货日期</th>
			<th width="8%">发货日期</th>
			<th width="9%">MYSEE状态</th>
			<th width="8%">操作人</th>
			<th width="7%">时间</th>
			<th width="10%">操作</th>
		</tr>
		<!--{loop $orders $v}-->
		
		<tr>
			<td>{$v[id]}<input name="productId[]" type="hidden" id="productId[]" value="<!--{$v[id]}-->"  />&nbsp;</td>
			<td>{$v[username]}</td>
			<td>{$v[pact]}&nbsp;</td>
			<td id="xm_$v[id]">{$v[project]}</td>
			<td id="ht_$v[id]">{$v[total]}</td>
			<td id="fk_$v[id]">{$v[payment]}</td>
			<td >
			<!--{if $v[arr_date] != '0'}--><strong>{$v[arr_date]}</strong>个货没到
			<!--{else}-->
				<font color="#FF0000">货已全到</font>
			<!--{/if}-->			</td>
			<td >
			<!--{if $v[del_date] != '0'}--><strong>{$v[del_date]}</strong>个货没发
			<!--{else}-->
				<font color="#FF0000">货已全发</font>
			<!--{/if}-->			</td>
			<td align="center" id="kp_$v[id]" style="padding-left:10px">{$v[bill_date]}</td>
			<td align="center" id="kp_$v[id]" style="padding-left:10px">{$v[names]}</td>
			<td align="center" style="padding-left:10px">{$v[times]}</td>
			<td>
				<a href="order-qiyeview-{$v[id]}.htm">查看</a>
				
				<a href="order-qiyeimport-{$v[id]}.htm?id={$v[id]}&username={$v[username]};" >导入</a> <a href="order-qiyedelete-{$v[id]}.htm" onclick="if(confirm('删除后，将不可恢复！你是否真的需要删除？')){return true;}else{return false;}">删除</a> <br />
				<a href="order-qiyeexport.htm?id={$v[id]}">导出合同</a> <a href="order-qiyeqingdan.htm?id={$v[id]}&amp;pact={$v[pact]}">导出清单 </a></td>
		</tr>
		<!--{/loop}-->
		<tr>
			<td colspan="15">$multipage</td>
		</tr>
	      </table>
      </form>
	</div>
</div>
{template footer}